#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main() {
	int n;scanf("%d", &n);
	int m = n;
	printf("oushuwei:");
	for (int i = 1;i <= 31;i += 2) {
		printf("%d ", (n >> i - 1) & 1);
	}
	printf("\n");
	printf("jishuwei:");
	for (int i = 0;i <= 31;i += 2) {
		printf("%d ", (n >> i - 1) & 1);
	}
	return 0;
}